Version

BinarySearch<T>(IIndexedPool<T>,Func<T,Int32>) Method

Conducts a binary search for a value in the indexed pool using a given comparison function.
Syntax
'Declaration
 
Public Overloads Shared Function BinarySearch(Of T)( _
   ByVal list As IIndexedPool(Of T), _
   ByVal comparisonFunction As Func(Of T,Integer) _
) As Integer
public static int BinarySearch<T>( 
   IIndexedPool<T> list,
   Func<T,int> comparisonFunction
)

Parameters

list
The pool of items to search.
comparisonFunction
A comparison function used for finding the target item in the pool.

Type Parameters

T
The Type of items in the pool.

Return Value

The index of the found item in the pool.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also